package com.platform.component.excel.exporter;

import java.io.IOException;
import java.io.Serializable;
import java.util.Map;


/**
  * Title: Exporter
  * Description: 导出器接口
  * Date 2020/5/8
  *
  * @author wxw
  * @version v1.0
  */
public interface Exporter extends Serializable, AutoCloseable {

    /**
     * 打开文件
     * @throws Exception 抛出异常
     */
    void open() throws Exception;

    /**
     * 注册标题
     */
    void putTitle();

    /**
     * 刷新数据
     * @throws IOException 抛出异常
     */
    void refresh() throws  IOException;

    /**
     * 写入数据
     * @param data 数据
     * @return Map<String, Object> 数据
     * @throws Exception 抛出异常
     */
    Map<String, Object> put(Map<String, Object> data) throws Exception;

}
